package persistent;

import persistent.*;
import LoginUtil.User;

import java.util.Date;

/**
 * This is a record that represents a date for a doctor's visit
 * @author Winfred Nadeau
 *
 */
public class Appointment extends Record{

	/**
	 * Nurses can be assigned to appointments for appt management,
	 *  but all of their actions after the waiting room are the doctor's by proxy.
	 *  all nurses have a doctor under which they work (maybe several)
	 *  that can be referenced in code for record generation where a Doctor is needed.
	 */
	private User nurse;
	/**
	 * the date of the appointment
	 */
	private Date date;
	/**
	 * 
	 * @param doc the appointment's doctor
	 * @param patient the appointment's patient
	 * @param date the date of the appointment
	 * @param nurse the optional Nurse you'd like to get the healthcare going
	 */
	public Appointment(User doc, User patient, Date date, User nurse)
	{
		this(doc,patient,date);
		this.nurse = nurse;
	}
	public Appointment(User doc, User patient,Date date) {
		super(patient,doc);
		this.date = date;
	}
	
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
}
